<!DOCTYPE html>
<html lang="en-US" dir="ltr">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>阿泽的笔记 | 阿泽的笔记</title>
    <meta name="description" content="做一个努力的码农">
    <link rel="preload stylesheet" href="/assets/style.47519a3e.css" as="style">
    
    <script type="module" src="/assets/app.130cc073.js"></script>
    <link rel="preload" href="/assets/inter-roman-latin.2ed14f66.woff2" as="font" type="font/woff2" crossorigin="">
    <link rel="modulepreload" href="/assets/chunks/framework.cc795e4d.js">
    <link rel="modulepreload" href="/assets/chunks/theme.3ebce9b1.js">
    <link rel="modulepreload" href="/assets/tools_jquery的使用.md.e9d67fbd.lean.js">
    <script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
    <script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
  </head>
  <body>
    <div id="app"><div class="Layout" data-v-5a346dfe><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0f60ec36></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0f60ec36> Skip to content </a><!--]--><!----><header class="VPNav" data-v-5a346dfe data-v-ae24b3ad><div class="VPNavBar has-sidebar" data-v-ae24b3ad data-v-a0fd61f4><div class="container" data-v-a0fd61f4><div class="title" data-v-a0fd61f4><div class="VPNavBarTitle has-sidebar" data-v-a0fd61f4 data-v-86d1bed8><a class="title" href="/" data-v-86d1bed8><!--[--><!--]--><!----><!--[-->阿泽的笔记<!--]--><!--[--><!--]--></a></div></div><div class="content" data-v-a0fd61f4><div class="curtain" data-v-a0fd61f4></div><div class="content-body" data-v-a0fd61f4><!--[--><!--]--><div class="VPNavBarSearch search" data-v-a0fd61f4><!----></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-a0fd61f4 data-v-7f418b0f><span id="main-nav-aria-label" class="visually-hidden" data-v-7f418b0f>Main Navigation</span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/" tabindex="0" data-v-7f418b0f data-v-42ef59de><!--[--><span data-v-42ef59de>首页</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/case/" tabindex="0" data-v-7f418b0f data-v-42ef59de><!--[--><span data-v-42ef59de>案例</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/tools/" tabindex="0" data-v-7f418b0f data-v-42ef59de><!--[--><span data-v-42ef59de>工具</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-a0fd61f4 data-v-e6aabb21><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="toggle dark mode" aria-checked="false" data-v-e6aabb21 data-v-ce54a7d1 data-v-b1685198><span class="check" data-v-b1685198><span class="icon" data-v-b1685198><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="sun" data-v-ce54a7d1><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path><path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path><path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path><path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path><path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="moon" data-v-ce54a7d1><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg><!--]--></span></span></button></div><!----><div class="VPFlyout VPNavBarExtra extra" data-v-a0fd61f4 data-v-40855f84 data-v-9c007e85><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-9c007e85><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="icon" data-v-9c007e85><circle cx="12" cy="12" r="2"></circle><circle cx="19" cy="12" r="2"></circle><circle cx="5" cy="12" r="2"></circle></svg></button><div class="menu" data-v-9c007e85><div class="VPMenu" data-v-9c007e85 data-v-e7ea1737><!----><!--[--><!--[--><!----><div class="group" data-v-40855f84><div class="item appearance" data-v-40855f84><p class="label" data-v-40855f84>Appearance</p><div class="appearance-action" data-v-40855f84><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="toggle dark mode" aria-checked="false" data-v-40855f84 data-v-ce54a7d1 data-v-b1685198><span class="check" data-v-b1685198><span class="icon" data-v-b1685198><!--[--><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="sun" data-v-ce54a7d1><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path><path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path><path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path><path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path><path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path><path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path><path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path><path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path><path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="moon" data-v-ce54a7d1><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg><!--]--></span></span></button></div></div></div><!----><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-a0fd61f4 data-v-e5dd9c1c><span class="container" data-v-e5dd9c1c><span class="top" data-v-e5dd9c1c></span><span class="middle" data-v-e5dd9c1c></span><span class="bottom" data-v-e5dd9c1c></span></span></button></div></div></div></div><!----></header><div class="VPLocalNav reached-top" data-v-5a346dfe data-v-79c8c1df><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-79c8c1df><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="menu-icon" data-v-79c8c1df><path d="M17,11H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h14c0.6,0,1,0.4,1,1S17.6,11,17,11z"></path><path d="M21,7H3C2.4,7,2,6.6,2,6s0.4-1,1-1h18c0.6,0,1,0.4,1,1S21.6,7,21,7z"></path><path d="M21,15H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h18c0.6,0,1,0.4,1,1S21.6,15,21,15z"></path><path d="M17,19H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h14c0.6,0,1,0.4,1,1S17.6,19,17,19z"></path></svg><span class="menu-text" data-v-79c8c1df>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-79c8c1df data-v-1c15a60a><button data-v-1c15a60a>Return to top</button><!----></div></div><aside class="VPSidebar" data-v-5a346dfe data-v-b00e2fdd><div class="curtain" data-v-b00e2fdd></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-b00e2fdd><span class="visually-hidden" id="sidebar-aria-label" data-v-b00e2fdd> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="group" data-v-b00e2fdd><section class="VPSidebarItem level-0 collapsible collapsed" data-v-b00e2fdd data-v-e31bd47b><div class="item" role="button" tabindex="0" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><h2 class="text" data-v-e31bd47b>工具</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-e31bd47b><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="caret-icon" data-v-e31bd47b><path d="M9,19c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l5.3-5.3L8.3,6.7c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l6,6c0.4,0.4,0.4,1,0,1.4l-6,6C9.5,18.9,9.3,19,9,19z"></path></svg></div></div><div class="items" data-v-e31bd47b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/adb%E5%91%BD%E4%BB%A4.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>adb命令</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/arduino%E5%9F%BA%E7%A1%80%E6%93%8D%E4%BD%9C.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>arduino基础操作</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/cmd%20npm%20yarn%20pnpm%E5%91%BD%E4%BB%A4.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>cmd npm yarn pnpm命令</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/elementUi%E7%AC%94%E8%AE%B0.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>elementUi笔记</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/Emmet%20Web%E5%BF%AB%E9%80%9F%E6%9E%84%E5%BB%BA%E5%91%BD%E4%BB%A4.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>Emmet Web快速构建命令</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/git%E7%AC%94%E8%AE%B0.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>git笔记</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/js%E7%9F%A5%E8%AF%86%E7%82%B9.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>js知识点</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/linux%E5%91%BD%E4%BB%A4.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>linux命令</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/linux%E5%9F%9F%E5%90%8D%E9%85%8D%E7%BD%AE%E5%8F%8A%E5%8F%8D%E5%90%91%E4%BB%A3%E7%90%86.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>linux域名配置及反向代理</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/mac%E4%BD%BF%E7%94%A8%E7%AC%94%E8%AE%B0.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>mac使用笔记</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/mysql%E5%91%BD%E4%BB%A4.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>mysql命令</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/php%E5%9F%BA%E7%A1%80%E5%8F%8A%E5%B8%B8%E7%94%A8%E5%87%BD%E6%95%B0.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>php基础及常用函数</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/react.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>react</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/uniapp%E7%AC%94%E8%AE%B0.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>uniapp笔记</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/vue%E7%AC%94%E8%AE%B0.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>vue笔记</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/tools/%E5%89%8D%E7%AB%AF%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>前端基础知识</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="group" data-v-b00e2fdd><section class="VPSidebarItem level-0 collapsible collapsed" data-v-b00e2fdd data-v-e31bd47b><div class="item" role="button" tabindex="0" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><h2 class="text" data-v-e31bd47b>案例</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-e31bd47b><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" viewbox="0 0 24 24" class="caret-icon" data-v-e31bd47b><path d="M9,19c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l5.3-5.3L8.3,6.7c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l6,6c0.4,0.4,0.4,1,0,1.4l-6,6C9.5,18.9,9.3,19,9,19z"></path></svg></div></div><div class="items" data-v-e31bd47b><!--[--><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/css%E6%8A%80%E5%B7%A7.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>css技巧</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/python%E8%87%AA%E5%8A%A8%E6%B5%8B%E8%AF%95%E8%84%9A%E6%9C%AC.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>python自动测试脚本</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/uniapp%E8%B8%A9%E5%9D%91%E8%AE%B0%E5%BD%95.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>uniapp踩坑记录</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/vuex%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>vuex使用示例</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/vue%E5%85%AD%E7%A7%8Dl%E4%BC%A0%E8%BE%93%E6%96%B9%E5%BC%8F.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>vue六种l传输方式</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/vue%E5%AE%9E%E4%BE%8B%E6%8A%80%E5%B7%A7.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>vue实例技巧</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/%E4%BC%98%E7%A7%80%E7%9A%84%E5%BC%80%E6%BA%90vue%E7%BB%84%E4%BB%B6.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>优秀的开源vue组件</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/%E5%89%8D%E7%AB%AF%E6%97%A5%E5%BF%97.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>前端日志</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/%E5%BC%80%E5%8F%91%E5%AF%8C%E6%96%87%E6%9C%AC%E6%9C%AC%E7%BC%96%E8%BE%91%E5%99%A8.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>开发富文本本编辑器</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/%E6%8F%92%E4%BB%B6%E4%BD%BF%E7%94%A8%E9%85%8D%E7%BD%AE.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>插件使用配置</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/%E6%A0%B7%E5%BC%8F%E5%B8%83%E5%B1%80.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>样式布局</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-e31bd47b data-v-e31bd47b><div class="item" data-v-e31bd47b><div class="indicator" data-v-e31bd47b></div><a class="VPLink link link" href="/case/%E8%BD%ACpdf%E7%9B%B8%E5%85%B3.html" data-v-e31bd47b><!--[--><p class="text" data-v-e31bd47b>转pdf相关</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-5a346dfe data-v-669faec9><div class="VPDoc has-sidebar has-aside" data-v-669faec9 data-v-6b87e69f><!--[--><!--]--><div class="container" data-v-6b87e69f><div class="aside" data-v-6b87e69f><div class="aside-curtain" data-v-6b87e69f></div><div class="aside-container" data-v-6b87e69f><div class="aside-content" data-v-6b87e69f><div class="VPDocAside" data-v-6b87e69f data-v-3f215769><!--[--><!--]--><!--[--><!--]--><div class="VPDocAsideOutline" role="navigation" data-v-3f215769 data-v-d330b1bb><div class="content" data-v-d330b1bb><div class="outline-marker" data-v-d330b1bb></div><div class="outline-title" role="heading" aria-level="2" data-v-d330b1bb>On this page</div><nav aria-labelledby="doc-outline-aria-label" data-v-d330b1bb><span class="visually-hidden" id="doc-outline-aria-label" data-v-d330b1bb> Table of Contents for current page </span><ul class="root" data-v-d330b1bb data-v-d0ee3533><!--[--><!--]--></ul></nav></div></div><!--[--><!--]--><div class="spacer" data-v-3f215769></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-6b87e69f><div class="content-container" data-v-6b87e69f><!--[--><!--]--><!----><main class="main" data-v-6b87e69f><div style="position:relative;" class="vp-doc _tools_jquery%E7%9A%84%E4%BD%BF%E7%94%A8" data-v-6b87e69f><div><h3 id="一、书写规范" tabindex="-1">一、书写规范 <a class="header-anchor" href="#一、书写规范" aria-label="Permalink to &quot;一、书写规范&quot;">​</a></h3><div class="language-html vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">html</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">&lt;</span><span style="color:#85E89D;">script</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">type</span><span style="color:#E1E4E8;"> = </span><span style="color:#9ECBFF;">&quot;text/javascript&quot;</span><span style="color:#E1E4E8;"> &gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//简写</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">alert</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;loading!&#39;</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//全写</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(document).</span><span style="color:#B392F0;">ready</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">(){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;p&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">click</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">(){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">hide</span><span style="color:#E1E4E8;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">&lt;/</span><span style="color:#85E89D;">script</span><span style="color:#E1E4E8;">&gt;</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"></span>
<span class="line"><span style="color:#24292E;">&lt;</span><span style="color:#22863A;">script</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">type</span><span style="color:#24292E;"> = </span><span style="color:#032F62;">&quot;text/javascript&quot;</span><span style="color:#24292E;"> &gt;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//简写</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">alert</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;loading!&#39;</span><span style="color:#24292E;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//全写</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(document).</span><span style="color:#6F42C1;">ready</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">(){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;p&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">click</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">(){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">hide</span><span style="color:#24292E;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">&lt;/</span><span style="color:#22863A;">script</span><span style="color:#24292E;">&gt;</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br></div></div><h3 id="二、事件处理" tabindex="-1">二、事件处理 <a class="header-anchor" href="#二、事件处理" aria-label="Permalink to &quot;二、事件处理&quot;">​</a></h3><div class="language-javascript vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">javascript</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"></span>
<span class="line"><span style="color:#6A737D;">//捕捉事件（加载完成后js添加的元素获取）</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;form.form-horizontal&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">on</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;click&#39;</span><span style="color:#E1E4E8;">, </span><span style="color:#9ECBFF;">&#39;.remove-button&#39;</span><span style="color:#E1E4E8;">,</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">alert</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">33</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//模拟点击事件</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;#submit-true&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">trigger</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;click&quot;</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//捕捉回车事件</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.enter-box&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">keyup</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">(</span><span style="color:#FFAB70;">event</span><span style="color:#E1E4E8;">) {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F97583;">if</span><span style="color:#E1E4E8;"> (event.keyCode </span><span style="color:#F97583;">==</span><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">13</span><span style="color:#E1E4E8;">) { </span><span style="color:#6A737D;">//PC端回车</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">find</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;.enterp1&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">trigger</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;click&quot;</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//阻止冒泡（应用空白处点击隐藏）</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.menu&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">click</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">(</span><span style="color:#FFAB70;">e</span><span style="color:#E1E4E8;">){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F97583;">var</span><span style="color:#E1E4E8;"> $w\</span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">parent</span><span style="color:#E1E4E8;">().</span><span style="color:#B392F0;">parent</span><span style="color:#E1E4E8;">().</span><span style="color:#B392F0;">children</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.edit-w1&#39;</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">f</span><span style="color:#E1E4E8;">($w.</span><span style="color:#B392F0;">is</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;:visible&#39;</span><span style="color:#E1E4E8;">)){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">$w.</span><span style="color:#B392F0;">fadeOut</span><span style="color:#E1E4E8;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">}</span><span style="color:#F97583;">else</span><span style="color:#E1E4E8;">{</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">$w.</span><span style="color:#B392F0;">fadeIn</span><span style="color:#E1E4E8;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">e.</span><span style="color:#B392F0;">stopPropagation</span><span style="color:#E1E4E8;">();</span><span style="color:#6A737D;">//阻止事件向上冒泡</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">})</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"></span>
<span class="line"><span style="color:#6A737D;">//捕捉事件（加载完成后js添加的元素获取）</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;form.form-horizontal&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">on</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;click&#39;</span><span style="color:#24292E;">, </span><span style="color:#032F62;">&#39;.remove-button&#39;</span><span style="color:#24292E;">,</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">alert</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">33</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//模拟点击事件</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;#submit-true&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">trigger</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;click&quot;</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//捕捉回车事件</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.enter-box&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">keyup</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">(</span><span style="color:#E36209;">event</span><span style="color:#24292E;">) {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#D73A49;">if</span><span style="color:#24292E;"> (event.keyCode </span><span style="color:#D73A49;">==</span><span style="color:#24292E;"> </span><span style="color:#005CC5;">13</span><span style="color:#24292E;">) { </span><span style="color:#6A737D;">//PC端回车</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">find</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;.enterp1&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">trigger</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;click&quot;</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//阻止冒泡（应用空白处点击隐藏）</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.menu&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">click</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">(</span><span style="color:#E36209;">e</span><span style="color:#24292E;">){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#D73A49;">var</span><span style="color:#24292E;"> $w\</span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">parent</span><span style="color:#24292E;">().</span><span style="color:#6F42C1;">parent</span><span style="color:#24292E;">().</span><span style="color:#6F42C1;">children</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.edit-w1&#39;</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">f</span><span style="color:#24292E;">($w.</span><span style="color:#6F42C1;">is</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;:visible&#39;</span><span style="color:#24292E;">)){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">$w.</span><span style="color:#6F42C1;">fadeOut</span><span style="color:#24292E;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">}</span><span style="color:#D73A49;">else</span><span style="color:#24292E;">{</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">$w.</span><span style="color:#6F42C1;">fadeIn</span><span style="color:#24292E;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">e.</span><span style="color:#6F42C1;">stopPropagation</span><span style="color:#24292E;">();</span><span style="color:#6A737D;">//阻止事件向上冒泡</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">})</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br></div></div><h3 id="三、ajax提交数据" tabindex="-1">三、ajax提交数据 <a class="header-anchor" href="#三、ajax提交数据" aria-label="Permalink to &quot;三、ajax提交数据&quot;">​</a></h3><div class="language-javascript vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">javascript</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"></span>
<span class="line"><span style="color:#6A737D;">//ajax GET</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">$.</span><span style="color:#B392F0;">ajax</span><span style="color:#E1E4E8;">({</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">url: url </span><span style="color:#F97583;">+</span><span style="color:#E1E4E8;"> </span><span style="color:#9ECBFF;">&#39;/mid/&#39;</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">+</span><span style="color:#E1E4E8;"> mid,</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//这里注意不要加分号，因为 ajax 是以逗号分隔</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">dataType: </span><span style="color:#9ECBFF;">&quot;json&quot;</span><span style="color:#E1E4E8;">,</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">success</span><span style="color:#E1E4E8;">: </span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">(</span><span style="color:#FFAB70;">data</span><span style="color:#E1E4E8;">) {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;form[name=&#39;deposit&#39;] input[name=&#39;name&#39;]&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">val</span><span style="color:#E1E4E8;">(data.name);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;form[name=&#39;deposit&#39;] input[name=&#39;phone&#39;]&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">val</span><span style="color:#E1E4E8;">(data.phone);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;form[name=&#39;deposit&#39;] input[name=&#39;mid&#39;]&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">val</span><span style="color:#E1E4E8;">(data.mid);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//ajax POST</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">$.</span><span style="color:#B392F0;">post</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;wechat_group_move.php&quot;</span><span style="color:#E1E4E8;">, {</span><span style="color:#9ECBFF;">&#39;mid&#39;</span><span style="color:#E1E4E8;">: str, </span><span style="color:#9ECBFF;">&#39;group&#39;</span><span style="color:#E1E4E8;">: group},</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">(</span><span style="color:#FFAB70;">result</span><span style="color:#E1E4E8;">) {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">// var data = jQuery.parseJSON(result); 如果返回值非对象格式 则需要解析</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F97583;">if</span><span style="color:#E1E4E8;"> (result </span><span style="color:#F97583;">==</span><span style="color:#E1E4E8;"> </span><span style="color:#79B8FF;">1</span><span style="color:#E1E4E8;">) {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">window.location.</span><span style="color:#B392F0;">reload</span><span style="color:#E1E4E8;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//ajax post表单</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">$.</span><span style="color:#B392F0;">ajax</span><span style="color:#E1E4E8;">({</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">type: </span><span style="color:#9ECBFF;">&quot;POST&quot;</span><span style="color:#E1E4E8;">,</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">url: </span><span style="color:#9ECBFF;">&quot;/index.aspx&quot;</span><span style="color:#E1E4E8;">,</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">data:</span><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;form&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">serialize</span><span style="color:#E1E4E8;">(),</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">/*</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">header: {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">&#39;content-type&#39;: &#39;application/x-www-form-urlencoded&#39;// 会将数据转换成 query string 以$_POST接收</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">},</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">*/</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">success</span><span style="color:#E1E4E8;">: </span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">(</span><span style="color:#FFAB70;">data</span><span style="color:#E1E4E8;">){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;#result&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">html</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;保存成功&quot;</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">});</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"></span>
<span class="line"><span style="color:#6A737D;">//ajax GET</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">$.</span><span style="color:#6F42C1;">ajax</span><span style="color:#24292E;">({</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">url: url </span><span style="color:#D73A49;">+</span><span style="color:#24292E;"> </span><span style="color:#032F62;">&#39;/mid/&#39;</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">+</span><span style="color:#24292E;"> mid,</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//这里注意不要加分号，因为 ajax 是以逗号分隔</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">dataType: </span><span style="color:#032F62;">&quot;json&quot;</span><span style="color:#24292E;">,</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">success</span><span style="color:#24292E;">: </span><span style="color:#D73A49;">function</span><span style="color:#24292E;">(</span><span style="color:#E36209;">data</span><span style="color:#24292E;">) {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;form[name=&#39;deposit&#39;] input[name=&#39;name&#39;]&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">val</span><span style="color:#24292E;">(data.name);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;form[name=&#39;deposit&#39;] input[name=&#39;phone&#39;]&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">val</span><span style="color:#24292E;">(data.phone);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;form[name=&#39;deposit&#39;] input[name=&#39;mid&#39;]&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">val</span><span style="color:#24292E;">(data.mid);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//ajax POST</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">$.</span><span style="color:#6F42C1;">post</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;wechat_group_move.php&quot;</span><span style="color:#24292E;">, {</span><span style="color:#032F62;">&#39;mid&#39;</span><span style="color:#24292E;">: str, </span><span style="color:#032F62;">&#39;group&#39;</span><span style="color:#24292E;">: group},</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">(</span><span style="color:#E36209;">result</span><span style="color:#24292E;">) {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">// var data = jQuery.parseJSON(result); 如果返回值非对象格式 则需要解析</span></span>
<span class="line"></span>
<span class="line"><span style="color:#D73A49;">if</span><span style="color:#24292E;"> (result </span><span style="color:#D73A49;">==</span><span style="color:#24292E;"> </span><span style="color:#005CC5;">1</span><span style="color:#24292E;">) {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">window.location.</span><span style="color:#6F42C1;">reload</span><span style="color:#24292E;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//ajax post表单</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">$.</span><span style="color:#6F42C1;">ajax</span><span style="color:#24292E;">({</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">type: </span><span style="color:#032F62;">&quot;POST&quot;</span><span style="color:#24292E;">,</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">url: </span><span style="color:#032F62;">&quot;/index.aspx&quot;</span><span style="color:#24292E;">,</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">data:</span><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;form&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">serialize</span><span style="color:#24292E;">(),</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">/*</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">header: {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">&#39;content-type&#39;: &#39;application/x-www-form-urlencoded&#39;// 会将数据转换成 query string 以$_POST接收</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">},</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">*/</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">success</span><span style="color:#24292E;">: </span><span style="color:#D73A49;">function</span><span style="color:#24292E;">(</span><span style="color:#E36209;">data</span><span style="color:#24292E;">){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;#result&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">html</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;保存成功&quot;</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">});</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br><span class="line-number">55</span><br><span class="line-number">56</span><br><span class="line-number">57</span><br><span class="line-number">58</span><br><span class="line-number">59</span><br><span class="line-number">60</span><br><span class="line-number">61</span><br><span class="line-number">62</span><br><span class="line-number">63</span><br><span class="line-number">64</span><br></div></div><p>四、元素过滤</p><div class="language-javascript vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">javascript</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取父类，子类，兄弟类元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;#show_msg&quot;</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">+</span><span style="color:#E1E4E8;"> mid).</span><span style="color:#B392F0;">parent</span><span style="color:#E1E4E8;">().</span><span style="color:#B392F0;">prevAll</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.time_tag&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">next</span><span style="color:#E1E4E8;">().</span><span style="color:#B392F0;">text</span><span style="color:#E1E4E8;">(time);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;#show_msg&quot;</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">+</span><span style="color:#E1E4E8;"> mid).</span><span style="color:#B392F0;">parent</span><span style="color:#E1E4E8;">().</span><span style="color:#B392F0;">prevAll</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.ext&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">find</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.new_msg&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">text</span><span style="color:#E1E4E8;">(con);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;#show_msg&quot;</span><span style="color:#E1E4E8;"> </span><span style="color:#F97583;">+</span><span style="color:#E1E4E8;"> mid).</span><span style="color:#B392F0;">parent</span><span style="color:#E1E4E8;">().</span><span style="color:#B392F0;">parent</span><span style="color:#E1E4E8;">().</span><span style="color:#B392F0;">parent</span><span style="color:#E1E4E8;">().</span><span style="color:#B392F0;">prev</span><span style="color:#E1E4E8;">().</span><span style="color:#B392F0;">prev</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.group_user&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">children</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;img&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">show</span><span style="color:#E1E4E8;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//注：parent()上一级父类prevAll()所有向上兄弟类prev()相邻向上兄弟类next()相邻向下children()子类find()子类查找</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取当前元素下标，及设置相应下标元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.right_nav a&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">click</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F97583;">var</span><span style="color:#E1E4E8;"> i </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.right_nav a&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">index</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.right_nav a&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">attr</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;class&quot;</span><span style="color:#E1E4E8;">, </span><span style="color:#9ECBFF;">&quot;normal&quot;</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.right_nav a&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">eq</span><span style="color:#E1E4E8;">(i).</span><span style="color:#B392F0;">attr</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;class&quot;</span><span style="color:#E1E4E8;">, </span><span style="color:#9ECBFF;">&quot;checked&quot;</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取就近某元素closest</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(element).</span><span style="color:#B392F0;">closest</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;div.col-xs-3&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">append</span><span style="color:#E1E4E8;">(error);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//过滤某元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.order_pro_list tr:not(.combine_pro)&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">each</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F97583;">var</span><span style="color:#E1E4E8;"> price_one </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">children</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;td&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">children</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;input&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">eq</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">1</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">val</span><span style="color:#E1E4E8;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F97583;">var</span><span style="color:#E1E4E8;"> num </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">children</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;td&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">children</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;input&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">eq</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">2</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">val</span><span style="color:#E1E4E8;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">children</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;td&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">children</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;input&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">eq</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">3</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">val</span><span style="color:#E1E4E8;">(price_one </span><span style="color:#F97583;">*</span><span style="color:#E1E4E8;"> num);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F97583;">var</span><span style="color:#E1E4E8;"> price </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">children</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;td&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">children</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;input&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">eq</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">3</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">val</span><span style="color:#E1E4E8;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">total </span><span style="color:#F97583;">+=</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">Number</span><span style="color:#E1E4E8;">(price);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F97583;">var</span><span style="color:#E1E4E8;"> payment_type </span><span style="color:#F97583;">=</span><span style="color:#E1E4E8;"> </span><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;input[name=&#39;payment_type&#39;]:checked&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">val</span><span style="color:#E1E4E8;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//遍历元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;[name=&#39;checkbox&#39;][checked]&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">each</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">removeAttr</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;checked&quot;</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//判断选中及包含class</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;input:checkbox[name=&#39;extra_check&#39;]&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">change</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//var extra = $(&quot;input:checkbox[name=&#39;extra_check&#39;]&quot;).val();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F97583;">if</span><span style="color:#E1E4E8;"> (</span><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">is</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;:checked&#39;</span><span style="color:#E1E4E8;">)) {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.extra&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">eq</span><span style="color:#E1E4E8;">(</span><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">val</span><span style="color:#E1E4E8;">()).</span><span style="color:#B392F0;">show</span><span style="color:#E1E4E8;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">} </span><span style="color:#F97583;">else</span><span style="color:#E1E4E8;"> {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.extra&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">eq</span><span style="color:#E1E4E8;">(</span><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">val</span><span style="color:#E1E4E8;">()).</span><span style="color:#B392F0;">hide</span><span style="color:#E1E4E8;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F97583;">if</span><span style="color:#E1E4E8;">(</span><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">hasClass</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;active&#39;</span><span style="color:#E1E4E8;">)){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.cause span&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">removeClass</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;active&#39;</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">}</span><span style="color:#F97583;">else</span><span style="color:#E1E4E8;">{</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.cause span&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">removeClass</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;active&#39;</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">addClass</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;active&#39;</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//全选/反选</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;#checkall&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">bind</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;click&quot;</span><span style="color:#E1E4E8;">, </span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;"> () {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;[name =&#39;tea[]&#39;]:checkbox&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">each</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;"> () {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#F97583;">if</span><span style="color:#E1E4E8;">(</span><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">is</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;:checked&quot;</span><span style="color:#E1E4E8;">)){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">removeAttr</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;checked&quot;</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">}</span><span style="color:#F97583;">else</span><span style="color:#E1E4E8;">{</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">prop</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;checked&quot;</span><span style="color:#E1E4E8;">,</span><span style="color:#9ECBFF;">&#39;checked&#39;</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">})</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取父类，子类，兄弟类元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;#show_msg&quot;</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">+</span><span style="color:#24292E;"> mid).</span><span style="color:#6F42C1;">parent</span><span style="color:#24292E;">().</span><span style="color:#6F42C1;">prevAll</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.time_tag&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">next</span><span style="color:#24292E;">().</span><span style="color:#6F42C1;">text</span><span style="color:#24292E;">(time);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;#show_msg&quot;</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">+</span><span style="color:#24292E;"> mid).</span><span style="color:#6F42C1;">parent</span><span style="color:#24292E;">().</span><span style="color:#6F42C1;">prevAll</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.ext&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">find</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.new_msg&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">text</span><span style="color:#24292E;">(con);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;#show_msg&quot;</span><span style="color:#24292E;"> </span><span style="color:#D73A49;">+</span><span style="color:#24292E;"> mid).</span><span style="color:#6F42C1;">parent</span><span style="color:#24292E;">().</span><span style="color:#6F42C1;">parent</span><span style="color:#24292E;">().</span><span style="color:#6F42C1;">parent</span><span style="color:#24292E;">().</span><span style="color:#6F42C1;">prev</span><span style="color:#24292E;">().</span><span style="color:#6F42C1;">prev</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.group_user&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">children</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;img&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">show</span><span style="color:#24292E;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//注：parent()上一级父类prevAll()所有向上兄弟类prev()相邻向上兄弟类next()相邻向下children()子类find()子类查找</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取当前元素下标，及设置相应下标元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.right_nav a&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">click</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#D73A49;">var</span><span style="color:#24292E;"> i </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.right_nav a&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">index</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.right_nav a&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">attr</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;class&quot;</span><span style="color:#24292E;">, </span><span style="color:#032F62;">&quot;normal&quot;</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.right_nav a&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">eq</span><span style="color:#24292E;">(i).</span><span style="color:#6F42C1;">attr</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;class&quot;</span><span style="color:#24292E;">, </span><span style="color:#032F62;">&quot;checked&quot;</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取就近某元素closest</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(element).</span><span style="color:#6F42C1;">closest</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;div.col-xs-3&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">append</span><span style="color:#24292E;">(error);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//过滤某元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.order_pro_list tr:not(.combine_pro)&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">each</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#D73A49;">var</span><span style="color:#24292E;"> price_one </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">children</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;td&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">children</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;input&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">eq</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">1</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">val</span><span style="color:#24292E;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#D73A49;">var</span><span style="color:#24292E;"> num </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">children</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;td&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">children</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;input&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">eq</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">2</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">val</span><span style="color:#24292E;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">children</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;td&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">children</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;input&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">eq</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">3</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">val</span><span style="color:#24292E;">(price_one </span><span style="color:#D73A49;">*</span><span style="color:#24292E;"> num);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#D73A49;">var</span><span style="color:#24292E;"> price </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">children</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;td&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">children</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;input&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">eq</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">3</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">val</span><span style="color:#24292E;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">total </span><span style="color:#D73A49;">+=</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">Number</span><span style="color:#24292E;">(price);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#D73A49;">var</span><span style="color:#24292E;"> payment_type </span><span style="color:#D73A49;">=</span><span style="color:#24292E;"> </span><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;input[name=&#39;payment_type&#39;]:checked&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">val</span><span style="color:#24292E;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//遍历元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;[name=&#39;checkbox&#39;][checked]&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">each</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">removeAttr</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;checked&quot;</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//判断选中及包含class</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;input:checkbox[name=&#39;extra_check&#39;]&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">change</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//var extra = $(&quot;input:checkbox[name=&#39;extra_check&#39;]&quot;).val();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#D73A49;">if</span><span style="color:#24292E;"> (</span><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">is</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;:checked&#39;</span><span style="color:#24292E;">)) {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.extra&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">eq</span><span style="color:#24292E;">(</span><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">val</span><span style="color:#24292E;">()).</span><span style="color:#6F42C1;">show</span><span style="color:#24292E;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">} </span><span style="color:#D73A49;">else</span><span style="color:#24292E;"> {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.extra&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">eq</span><span style="color:#24292E;">(</span><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">val</span><span style="color:#24292E;">()).</span><span style="color:#6F42C1;">hide</span><span style="color:#24292E;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#D73A49;">if</span><span style="color:#24292E;">(</span><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">hasClass</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;active&#39;</span><span style="color:#24292E;">)){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.cause span&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">removeClass</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;active&#39;</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">}</span><span style="color:#D73A49;">else</span><span style="color:#24292E;">{</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.cause span&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">removeClass</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;active&#39;</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">addClass</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;active&#39;</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//全选/反选</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;#checkall&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">bind</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;click&quot;</span><span style="color:#24292E;">, </span><span style="color:#D73A49;">function</span><span style="color:#24292E;"> () {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;[name =&#39;tea[]&#39;]:checkbox&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">each</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;"> () {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#D73A49;">if</span><span style="color:#24292E;">(</span><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">is</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;:checked&quot;</span><span style="color:#24292E;">)){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">removeAttr</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;checked&quot;</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">}</span><span style="color:#D73A49;">else</span><span style="color:#24292E;">{</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">prop</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;checked&quot;</span><span style="color:#24292E;">,</span><span style="color:#032F62;">&#39;checked&#39;</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">})</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br><span class="line-number">55</span><br><span class="line-number">56</span><br><span class="line-number">57</span><br><span class="line-number">58</span><br><span class="line-number">59</span><br><span class="line-number">60</span><br><span class="line-number">61</span><br><span class="line-number">62</span><br><span class="line-number">63</span><br><span class="line-number">64</span><br><span class="line-number">65</span><br><span class="line-number">66</span><br><span class="line-number">67</span><br><span class="line-number">68</span><br><span class="line-number">69</span><br><span class="line-number">70</span><br><span class="line-number">71</span><br><span class="line-number">72</span><br><span class="line-number">73</span><br><span class="line-number">74</span><br><span class="line-number">75</span><br><span class="line-number">76</span><br><span class="line-number">77</span><br><span class="line-number">78</span><br><span class="line-number">79</span><br><span class="line-number">80</span><br><span class="line-number">81</span><br><span class="line-number">82</span><br><span class="line-number">83</span><br><span class="line-number">84</span><br><span class="line-number">85</span><br><span class="line-number">86</span><br><span class="line-number">87</span><br><span class="line-number">88</span><br><span class="line-number">89</span><br><span class="line-number">90</span><br><span class="line-number">91</span><br><span class="line-number">92</span><br><span class="line-number">93</span><br><span class="line-number">94</span><br><span class="line-number">95</span><br><span class="line-number">96</span><br><span class="line-number">97</span><br><span class="line-number">98</span><br><span class="line-number">99</span><br><span class="line-number">100</span><br><span class="line-number">101</span><br><span class="line-number">102</span><br></div></div><h3 id="五、获取元素值及修改" tabindex="-1">五、获取元素值及修改 <a class="header-anchor" href="#五、获取元素值及修改" aria-label="Permalink to &quot;五、获取元素值及修改&quot;">​</a></h3><div class="language-javascript vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">javascript</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取窗口高度及窗口变化</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(window).</span><span style="color:#B392F0;">resize</span><span style="color:#E1E4E8;">(</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;#main-content&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">height</span><span style="color:#E1E4E8;">(</span><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(window).</span><span style="color:#B392F0;">height</span><span style="color:#E1E4E8;">());</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取及修改父窗口元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;#apointment_sid&#39;</span><span style="color:#E1E4E8;">, window.parent.document).</span><span style="color:#B392F0;">val</span><span style="color:#E1E4E8;">(sid);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//添加新元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;p&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">append</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Some appended text.&quot;</span><span style="color:#E1E4E8;">); </span><span style="color:#6A737D;">//在被选元素的结尾插入内容。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;p&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">prepend</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Some prepended text.&quot;</span><span style="color:#E1E4E8;">); </span><span style="color:#6A737D;">//在被选元素的开头插入内容。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;img&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">after</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Some text after&quot;</span><span style="color:#E1E4E8;">); </span><span style="color:#6A737D;">//在被选元素之后插入内容。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;img&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">before</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;Some text before&quot;</span><span style="color:#E1E4E8;">); </span><span style="color:#6A737D;">//在被选元素之前插入内容。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取及修改图片src</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;#imgbox-img&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">attr</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;src&#39;</span><span style="color:#E1E4E8;">, src);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//显示/隐藏/删除/清除</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.turn_left&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">show</span><span style="color:#E1E4E8;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.turn_left&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">hide</span><span style="color:#E1E4E8;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.turn_left&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">remove</span><span style="color:#E1E4E8;">();</span><span style="color:#6A737D;">//移除当前元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;#city&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">empty</span><span style="color:#E1E4E8;">(); </span><span style="color:#6A737D;">//删除子元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.zb_&#39;</span><span style="color:#F97583;">+</span><span style="color:#E1E4E8;">_sd).</span><span style="color:#B392F0;">replaceWith</span><span style="color:#E1E4E8;">(str); </span><span style="color:#6A737D;">//替换当前元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">f</span><span style="color:#E1E4E8;">($w.</span><span style="color:#B392F0;">is</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;:visible&#39;</span><span style="color:#E1E4E8;">)){ </span><span style="color:#6A737D;">//判断是否显示/显示</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">$w.</span><span style="color:#B392F0;">fadeOut</span><span style="color:#E1E4E8;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取及修改属性值</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;#imgbox-img&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">attr</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;show_flag&#39;</span><span style="color:#E1E4E8;">, </span><span style="color:#79B8FF;">2</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//移除Class或添加class</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;#imgbox-img&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">addClass</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;ajax-post&#39;</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;#imgbox-img&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">removeClass</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;ajax-post&#39;</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取值，html,text,css</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">this</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">css</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;color&#39;</span><span style="color:#E1E4E8;">, </span><span style="color:#9ECBFF;">&#39;#777777&#39;</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.group_tag&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">eq</span><span style="color:#E1E4E8;">(i).</span><span style="color:#B392F0;">attr</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;pt&#39;</span><span style="color:#E1E4E8;">, </span><span style="color:#79B8FF;">2</span><span style="color:#E1E4E8;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.group_tag&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">val</span><span style="color:#E1E4E8;">(); </span><span style="color:#6A737D;">//取值</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.group_tag&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">text</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;加载更多&#39;</span><span style="color:#E1E4E8;">); </span><span style="color:#6A737D;">//赋值</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&#39;.group_tag&#39;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">html</span><span style="color:#E1E4E8;">();</span><span style="color:#6A737D;">//获取html</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取窗口高度及窗口变化</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(window).</span><span style="color:#6F42C1;">resize</span><span style="color:#24292E;">(</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">() {</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;#main-content&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">height</span><span style="color:#24292E;">(</span><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(window).</span><span style="color:#6F42C1;">height</span><span style="color:#24292E;">());</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">});</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取及修改父窗口元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;#apointment_sid&#39;</span><span style="color:#24292E;">, window.parent.document).</span><span style="color:#6F42C1;">val</span><span style="color:#24292E;">(sid);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//添加新元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;p&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">append</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Some appended text.&quot;</span><span style="color:#24292E;">); </span><span style="color:#6A737D;">//在被选元素的结尾插入内容。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;p&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">prepend</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Some prepended text.&quot;</span><span style="color:#24292E;">); </span><span style="color:#6A737D;">//在被选元素的开头插入内容。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;img&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">after</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Some text after&quot;</span><span style="color:#24292E;">); </span><span style="color:#6A737D;">//在被选元素之后插入内容。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;img&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">before</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;Some text before&quot;</span><span style="color:#24292E;">); </span><span style="color:#6A737D;">//在被选元素之前插入内容。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取及修改图片src</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;#imgbox-img&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">attr</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;src&#39;</span><span style="color:#24292E;">, src);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//显示/隐藏/删除/清除</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.turn_left&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">show</span><span style="color:#24292E;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.turn_left&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">hide</span><span style="color:#24292E;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.turn_left&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">remove</span><span style="color:#24292E;">();</span><span style="color:#6A737D;">//移除当前元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;#city&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">empty</span><span style="color:#24292E;">(); </span><span style="color:#6A737D;">//删除子元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.zb_&#39;</span><span style="color:#D73A49;">+</span><span style="color:#24292E;">_sd).</span><span style="color:#6F42C1;">replaceWith</span><span style="color:#24292E;">(str); </span><span style="color:#6A737D;">//替换当前元素</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">f</span><span style="color:#24292E;">($w.</span><span style="color:#6F42C1;">is</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;:visible&#39;</span><span style="color:#24292E;">)){ </span><span style="color:#6A737D;">//判断是否显示/显示</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">$w.</span><span style="color:#6F42C1;">fadeOut</span><span style="color:#24292E;">();</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">}</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取及修改属性值</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;#imgbox-img&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">attr</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;show_flag&#39;</span><span style="color:#24292E;">, </span><span style="color:#005CC5;">2</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//移除Class或添加class</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;#imgbox-img&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">addClass</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;ajax-post&#39;</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;#imgbox-img&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">removeClass</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;ajax-post&#39;</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6A737D;">//获取值，html,text,css</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">this</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">css</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;color&#39;</span><span style="color:#24292E;">, </span><span style="color:#032F62;">&#39;#777777&#39;</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.group_tag&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">eq</span><span style="color:#24292E;">(i).</span><span style="color:#6F42C1;">attr</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;pt&#39;</span><span style="color:#24292E;">, </span><span style="color:#005CC5;">2</span><span style="color:#24292E;">);</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.group_tag&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">val</span><span style="color:#24292E;">(); </span><span style="color:#6A737D;">//取值</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.group_tag&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">text</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;加载更多&#39;</span><span style="color:#24292E;">); </span><span style="color:#6A737D;">//赋值</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&#39;.group_tag&#39;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">html</span><span style="color:#24292E;">();</span><span style="color:#6A737D;">//获取html</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br><span class="line-number">55</span><br><span class="line-number">56</span><br><span class="line-number">57</span><br><span class="line-number">58</span><br><span class="line-number">59</span><br><span class="line-number">60</span><br><span class="line-number">61</span><br><span class="line-number">62</span><br><span class="line-number">63</span><br><span class="line-number">64</span><br><span class="line-number">65</span><br><span class="line-number">66</span><br></div></div><h3 id="六、动画效果" tabindex="-1">六、动画效果 <a class="header-anchor" href="#六、动画效果" aria-label="Permalink to &quot;六、动画效果&quot;">​</a></h3><div class="language-javascript vp-adaptive-theme line-numbers-mode"><button title="Copy Code" class="copy"></button><span class="lang">javascript</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#6A737D;">//动画</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;#div3&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">fadeIn</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">3000</span><span style="color:#E1E4E8;">);</span><span style="color:#6A737D;">//用于淡入已隐藏的元素。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;#div3&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">fadeOut</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">3000</span><span style="color:#E1E4E8;">);</span><span style="color:#6A737D;">//方法用于淡出可见元素。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;#div3&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">fadeToggle</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">3000</span><span style="color:#E1E4E8;">);</span><span style="color:#6A737D;">//方法可以在 fadeIn() 与 fadeOut() 方法之间进行切换。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;#div3&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">fadeTo</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;slow&quot;</span><span style="color:#E1E4E8;">,</span><span style="color:#79B8FF;">0.7</span><span style="color:#E1E4E8;">); </span><span style="color:#6A737D;">//方法允许渐变为给定的不透明度（值介于 0 与 1 之间）。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;#panel&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">slideDown</span><span style="color:#E1E4E8;">();</span><span style="color:#6A737D;">//方法用于向下滑动元素。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;#panel&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">slideUp</span><span style="color:#E1E4E8;">(); </span><span style="color:#6A737D;">//slideUp() 方法用于向上滑动元素。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;#panel&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">slideToggle</span><span style="color:#E1E4E8;">();</span><span style="color:#6A737D;">//方法可以在 slideDown() 与 slideUp() 方法之间进行切换。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#B392F0;">$</span><span style="color:#E1E4E8;">(</span><span style="color:#9ECBFF;">&quot;div&quot;</span><span style="color:#E1E4E8;">).</span><span style="color:#B392F0;">animate</span><span style="color:#E1E4E8;">({</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">left:</span><span style="color:#9ECBFF;">&#39;250px&#39;</span><span style="color:#E1E4E8;">,</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">opacity:</span><span style="color:#9ECBFF;">&#39;0.5&#39;</span><span style="color:#E1E4E8;">,</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">height:</span><span style="color:#9ECBFF;">&#39;150px&#39;</span><span style="color:#E1E4E8;">,</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">width:</span><span style="color:#9ECBFF;">&#39;150px&#39;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">},</span><span style="color:#79B8FF;">1500</span><span style="color:#E1E4E8;">,</span><span style="color:#F97583;">function</span><span style="color:#E1E4E8;">(){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">console.</span><span style="color:#B392F0;">log</span><span style="color:#E1E4E8;">(</span><span style="color:#79B8FF;">123456</span><span style="color:#E1E4E8;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#E1E4E8;">}); </span><span style="color:#6A737D;">//创建自定义动画。</span></span></code></pre><pre class="shiki github-light vp-code-light"><code><span class="line"><span style="color:#6A737D;">//动画</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;#div3&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">fadeIn</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">3000</span><span style="color:#24292E;">);</span><span style="color:#6A737D;">//用于淡入已隐藏的元素。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;#div3&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">fadeOut</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">3000</span><span style="color:#24292E;">);</span><span style="color:#6A737D;">//方法用于淡出可见元素。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;#div3&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">fadeToggle</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">3000</span><span style="color:#24292E;">);</span><span style="color:#6A737D;">//方法可以在 fadeIn() 与 fadeOut() 方法之间进行切换。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;#div3&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">fadeTo</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;slow&quot;</span><span style="color:#24292E;">,</span><span style="color:#005CC5;">0.7</span><span style="color:#24292E;">); </span><span style="color:#6A737D;">//方法允许渐变为给定的不透明度（值介于 0 与 1 之间）。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;#panel&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">slideDown</span><span style="color:#24292E;">();</span><span style="color:#6A737D;">//方法用于向下滑动元素。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;#panel&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">slideUp</span><span style="color:#24292E;">(); </span><span style="color:#6A737D;">//slideUp() 方法用于向上滑动元素。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;#panel&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">slideToggle</span><span style="color:#24292E;">();</span><span style="color:#6A737D;">//方法可以在 slideDown() 与 slideUp() 方法之间进行切换。</span></span>
<span class="line"></span>
<span class="line"><span style="color:#6F42C1;">$</span><span style="color:#24292E;">(</span><span style="color:#032F62;">&quot;div&quot;</span><span style="color:#24292E;">).</span><span style="color:#6F42C1;">animate</span><span style="color:#24292E;">({</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">left:</span><span style="color:#032F62;">&#39;250px&#39;</span><span style="color:#24292E;">,</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">opacity:</span><span style="color:#032F62;">&#39;0.5&#39;</span><span style="color:#24292E;">,</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">height:</span><span style="color:#032F62;">&#39;150px&#39;</span><span style="color:#24292E;">,</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">width:</span><span style="color:#032F62;">&#39;150px&#39;</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">},</span><span style="color:#005CC5;">1500</span><span style="color:#24292E;">,</span><span style="color:#D73A49;">function</span><span style="color:#24292E;">(){</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">console.</span><span style="color:#6F42C1;">log</span><span style="color:#24292E;">(</span><span style="color:#005CC5;">123456</span><span style="color:#24292E;">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:#24292E;">}); </span><span style="color:#6A737D;">//创建自定义动画。</span></span></code></pre><div class="line-numbers-wrapper" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br></div></div></div></div></main><footer class="VPDocFooter" data-v-6b87e69f data-v-ef5dee53><!--[--><!--]--><!----><nav class="prev-next" data-v-ef5dee53><div class="pager" data-v-ef5dee53><!----></div><div class="pager" data-v-ef5dee53><a class="pager-link next" href="/tools/adb%E5%91%BD%E4%BB%A4.html" data-v-ef5dee53><span class="desc" data-v-ef5dee53>Next page</span><span class="title" data-v-ef5dee53>adb命令</span></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
    <script>window.__VP_HASH_MAP__=JSON.parse("{\"case_getaccesstoken.md\":\"67a16083\",\"case_前端日志.md\":\"270996e6\",\"case_前端防切屏.md\":\"6d67367b\",\"ai学习笔记_个人理解.md\":\"62e8b40f\",\"case_vue实例技巧.md\":\"75787181\",\"日志_关于企业站的seo.md\":\"496419f4\",\"case_插件使用配置.md\":\"fe83b1c1\",\"办公_版本处理方案.md\":\"e749eb0e\",\"办公_开发记录.md\":\"437c4662\",\"case_mac使用.md\":\"48c33f34\",\"办公_app开通微信支付.md\":\"95c825d6\",\"tools_arduino基础操作.md\":\"f997fb69\",\"日志_uniapp内存泄漏事件.md\":\"25a76630\",\"case_ios上架笔记.md\":\"84d52929\",\"case_开发富文本本编辑器.md\":\"d7842807\",\"办公_ebm后端及数据库笔记.md\":\"0c19b5f3\",\"case_uniapp踩坑记录.md\":\"4e47ad2a\",\"tools_conda命令  pip命令.md\":\"23ac8380\",\"办公_待解决问题.md\":\"dcc132f1\",\"case_优秀的开源vue组件.md\":\"6020f82e\",\"case_样式布局.md\":\"670153be\",\"tools_emmet web快速构建命令.md\":\"02ded381\",\"ai学习笔记_二、应用场景.md\":\"3985787b\",\"java笔记_程序基础.md\":\"750d7bf5\",\"日志_合格的文档.md\":\"e2dd10c4\",\"tools_index.md\":\"8efae136\",\"tools_设计规范.md\":\"c1e5222d\",\"case_转pdf相关.md\":\"9b047234\",\"case_vuex使用示例.md\":\"042f3339\",\"tools_elementui笔记.md\":\"d727814f\",\"办公_应用中心框架更新.md\":\"9124a7e9\",\"ai学习笔记_一、概念.md\":\"960b8e6d\",\"case_markdown文件转换目录列表.md\":\"f04a5805\",\"tools_cmd npm yarn pnpm命令.md\":\"deebc540\",\"case_css技巧.md\":\"cedd6cee\",\"ai学习笔记_四、模型.md\":\"f9d2ec81\",\"办公_代码示例_l律所起诉状.md\":\"f875bace\",\"tools_adb命令.md\":\"9831c553\",\"tools_命名汇总推荐.md\":\"3bf819e1\",\"办公_seo方案.md\":\"22a7e45f\",\"java笔记_面向对象编程.md\":\"486db2ad\",\"日志_测试笔记.md\":\"00dcc692\",\"case_python自动测试脚本.md\":\"bec8212a\",\"index.md\":\"25642d62\",\"tools_mac使用笔记.md\":\"9ee5b2a6\",\"办公_实施笔记.md\":\"10ecc800\",\"tools_vue笔记.md\":\"be570cd4\",\"ai学习笔记_五、模型发展.md\":\"a9feb551\",\"case_vue六种l传输方式.md\":\"cadce3ad\",\"case_index.md\":\"4370ee15\",\"ai学习笔记_六、开发.md\":\"0b1a367a\",\"tools_前端基础知识.md\":\"864e9786\",\"ai学习笔记_三、promt工程.md\":\"1b5a7f7c\",\"办公_todo.md\":\"2ccf3c97\",\"日志_前端自检项.md\":\"0544de55\",\"case_基础csss样式.md\":\"d368d629\",\"tools_react.md\":\"d032d22f\",\"case_数字化大屏问题点.md\":\"e37019d4\",\"tools_php基础及常用函数.md\":\"b2afeccf\",\"case_flutter安装配置.md\":\"ccbc694e\",\"tools_js知识点.md\":\"51436346\",\"case_富文本编辑器原理.md\":\"f3b0b2ee\",\"tools_mysql命令.md\":\"373a1b6c\",\"tools_linux命令.md\":\"82c20701\",\"办公_前端常用代码.md\":\"8923abd6\",\"tools_jquery的使用.md\":\"e9d67fbd\",\"tools_docker使用.md\":\"1ea0c513\",\"tools_uniapp笔记.md\":\"c0a178f5\",\"tools_git笔记.md\":\"9870fad6\",\"日志_自媒体笔记.md\":\"0d283ba7\",\"tools_linux域名配置及反向代理.md\":\"25492670\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"阿泽的笔记\",\"description\":\"做一个努力的码农\",\"base\":\"/\",\"head\":[],\"appearance\":true,\"themeConfig\":{\"displayAllHeaders\":true,\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"案例\",\"link\":\"/case/\"},{\"text\":\"工具\",\"link\":\"/tools/\"}],\"sidebar\":[{\"text\":\"工具\",\"collapsible\":true,\"collapsed\":true,\"items\":[{\"text\":\"adb命令\",\"link\":\"/tools/adb命令\"},{\"text\":\"arduino基础操作\",\"link\":\"/tools/arduino基础操作\"},{\"text\":\"cmd npm yarn pnpm命令\",\"link\":\"/tools/cmd npm yarn pnpm命令\"},{\"text\":\"elementUi笔记\",\"link\":\"/tools/elementUi笔记\"},{\"text\":\"Emmet Web快速构建命令\",\"link\":\"/tools/Emmet%20Web快速构建命令\"},{\"text\":\"git笔记\",\"link\":\"/tools/git笔记\"},{\"text\":\"js知识点\",\"link\":\"/tools/js知识点\"},{\"text\":\"linux命令\",\"link\":\"/tools/linux命令\"},{\"text\":\"linux域名配置及反向代理\",\"link\":\"/tools/linux域名配置及反向代理\"},{\"text\":\"mac使用笔记\",\"link\":\"/tools/mac使用笔记\"},{\"text\":\"mysql命令\",\"link\":\"/tools/mysql命令\"},{\"text\":\"php基础及常用函数\",\"link\":\"/tools/php基础及常用函数\"},{\"text\":\"react\",\"link\":\"/tools/react\"},{\"text\":\"uniapp笔记\",\"link\":\"/tools/uniapp笔记\"},{\"text\":\"vue笔记\",\"link\":\"/tools/vue笔记\"},{\"text\":\"前端基础知识\",\"link\":\"/tools/前端基础知识\"}]},{\"text\":\"案例\",\"collapsible\":true,\"collapsed\":true,\"items\":[{\"text\":\"css技巧\",\"link\":\"/case/css技巧\"},{\"text\":\"python自动测试脚本\",\"link\":\"/case/python自动测试脚本\"},{\"text\":\"uniapp踩坑记录\",\"link\":\"/case/uniapp踩坑记录\"},{\"text\":\"vuex使用示例\",\"link\":\"/case/vuex使用示例\"},{\"text\":\"vue六种l传输方式\",\"link\":\"/case/vue六种l传输方式\"},{\"text\":\"vue实例技巧\",\"link\":\"/case/vue实例技巧\"},{\"text\":\"优秀的开源vue组件\",\"link\":\"/case/优秀的开源vue组件\"},{\"text\":\"前端日志\",\"link\":\"/case/前端日志\"},{\"text\":\"开发富文本本编辑器\",\"link\":\"/case/开发富文本本编辑器\"},{\"text\":\"插件使用配置\",\"link\":\"/case/插件使用配置\"},{\"text\":\"样式布局\",\"link\":\"/case/样式布局\"},{\"text\":\"转pdf相关\",\"link\":\"/case/转pdf相关\"}]}]},\"locales\":{},\"scrollOffset\":90,\"cleanUrls\":false}");</script>
    
  </body>
</html>